﻿using Adnc.Application.Shared.Interceptors;
using Adnc.Application.Shared.Services;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using WYT.Usr.Application.Contracts.Dtos;

namespace WYT.Usr.Application.Contracts.Services
{
    /// <summary>
    /// 地址服务
    /// </summary>
    public interface IAddressAppService : IAppService
    {
        /// <summary>
        /// 添加用户地址
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        [OperateLog(LogName = "添加用户地址")]
        Task<AppSrvResult<long>> CreateAsync(long UserId,UserAddressCreationDto input);

        /// <summary>
        /// 修改用户地址
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        [OperateLog(LogName = "修改用户地址")]
        Task<AppSrvResult<Boolean>> UpdateAsync(long UserId, UserAddressUpdationDto input);

        /// <summary>
        /// 删除用户收货地址
        /// </summary>
        /// <param name="UserId"></param>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<AppSrvResult<Boolean>> DeleteAsync(long UserId,long Id);

        /// <summary>
        /// 查询用户收货地址
        /// </summary>
        /// <param name="UserId"></param>
        /// <returns></returns>
        Task<AppSrvResult<List<UserAddressDto>>> GetUserHarvestAddress(long UserId);

        /// <summary>
        /// 根据ID查询收货地址信息
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<AppSrvResult<UserAddressDto>> SearchById(long Id);
    }
}
